package mcts;

import java.util.Iterator;

public class GoGameTreeSonsListIterator implements Iterator<GoGameTree> {
	
	GoGameTreeSonsList list;
	
	public GoGameTreeSonsListIterator(GoGameTreeSonsList l) {
		this.list = l;
	}
	
	public boolean hasNext() {
		if (this.list == null) return false;
		return true;
	}

	public GoGameTree next() {
		GoGameTree node = list.getNode();
		list = list.getNext();
		return node;
	}

	public void remove() {
		System.err.println("Internal error : GoGameTreeSonsListIterator.remove() should not be called");
	}
	
}